{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}
<div id="workflow_credentials_dialog" class="modal fade" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Workflow Credentials</h4>
      </div>
      <div class="modal-body">
        <div class=" panel panel-default">
          <div class="panel-heading clearfix">
            <div class="pull-left paddingtop7">Credentials</div>
            <div id="credential-action-bar" class="pull-right">
              <button id="dataset-create-btn" {{action 'createCredentials'}} type="button" class="btn btn-default">
                <i class="fa fa-plus-circle"></i> Add
              </button>
            </div>
          </div>
          <div class="panel-body handlerPanel">

            <div class="paddingtop10">
              <ul class="list-group credential-list">
                {{#each credentialsList as |credential index|}}
                <li class="list-group-item">
                  {{credential.name}}<span class="cred-type">({{credential.type}})</span>
                  <span class="pull-right">
                    <i class="fa fa-trash-o" title="Delete" {{action "deleteCredentials" index bubbles=false}}></i>
                  </span>
                  <span class="pull-right paddingright10">
                    <i class="fa fa-pencil" title="Edit" {{action "editCredentials" index bubbles=false}}></i>
                  </span>
                </li>
                {{else}}
                  <span>No Credentials Configured.</span>
                {{/each}}
              </ul>
            </div>
          </div>
        </div>
        {{#if createMode}}
          {{#credentials-config credential=currentCredentials showCredentials="showCredentials" add="addCredentials" mode="create" cancel="cancelCreateMode"}}{{/credentials-config}}
        {{/if}}
        {{#if editMode}}
          {{#credentials-config credential=currentCredentials showCredentials="showCredentials" update="updateCredentials" mode="edit" cancel="cancelEditMode"}}{{/credentials-config}}
        {{/if}}
      </div>
      <!-- <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
        <button type="button" class="btn btn-primary" {{action "saveCredentials"}}>Save</button>
      </div> -->
    </div>
  </div>
</div>
